package com.tdp.dblp;

import java.util.ArrayList;
import java.util.jar.Attributes.Name;

import javax.print.attribute.standard.MediaSize.Other;

public class Conference {
	public String conf_key;
	public ArrayList<String> authors;
	public int year;
	public String booktitle;
	
	public static final int AUTHOR =1;
	public static final int YEAR =2;
	public static final int BOOKTITLE = 3;
	public static final int INPROCEEDINGS =5;
	
	public Conference() {
		conf_key = " ";
		year = 0;
		booktitle = " ";
		authors = new ArrayList<String>();
	}
	
	public static int getElement(String name){
		if(name.equals("author"))
			return AUTHOR;
		else if(name.equals("year"))
			return YEAR;
		else if(name.equals("inproceedings"))
			return INPROCEEDINGS;
		else if(name.equals("booktitle"))
			return BOOKTITLE;
		else return 0;
	}
	
	public static String getElementName(int id){
		if(id==AUTHOR)
			return "author";
		else if (id==YEAR) 
			return "year";
		else if(id==INPROCEEDINGS)
			return "inproceedings";
		else  if(id==BOOKTITLE)
			return "booktitle";
		else return "other";
	}
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return booktitle+"_"+year+"_"+conf_key;
	}
}
